/**
* @description: 周赛311 t1
* @author hewei
* @date 2022/9/18 10:30
* @version 1.0
*/

public class SmallestEvenMultiple {

    public int smallestEvenMultiple(int n) {
        int gcd = gcd(2, n);
        if (gcd == 1) return 2 * n;
        return 2 * (n / gcd);
    }

    public int gcd(int a, int b) {
        if (b == 0) return a;
        return gcd(b, a % b);
    }
}
